package com.hkjtgc.pcr_app.util

import android.app.Activity
import android.os.Build
import android.view.View
import android.view.WindowManager
import androidx.annotation.RequiresApi
import com.hkjtgc.pcr_app.R

internal object StatusBarUtil : Activity() {
    @RequiresApi(Build.VERSION_CODES.M)
    fun showStatusBar() {
        var window = this.window
        window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
        window.statusBarColor = this.resources.getColor(R.color.white);//设置状态栏颜色
        getWindow().decorView.systemUiVisibility =
            View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;//状态栏为白色 图标显示深色
    }
}